home *** CD-ROM | disk | FTP | other *** search
- /*
- * ToDoItemPublic - public implementation of ToDoItem, does not contain
- * priority calculation code
- *
- * You may freely copy, distribute and reuse the code in this example.
- * This code is provided AS IS without warranty of any kind, expressed
- * or implied, as to its fitness for any particular use.
- *
- * Copyright 1995 Ralph Zazula (rzazula@next.com). All Rights Reserved.
- *
- */
-
- #import <objc/Object.h>
- #import "ToDoItems.h"
-
- #define TODO_TYPE_NORMAL 0x0
- #define TODO_TYPE_APPOINTMENT 0x1
- #define TODO_TYPE_LOWPRIORITY 0x2
- #define TODO_TYPE_HIGHPRIORITY 0x3
-
- @interface ToDoItemPublic : Object <ToDoItems>
- {
- char *subject;
- long startDate, dueDate, dateCompleted;
- char *data;
- int dataLen;
- struct _toDoItemFlags {
- #ifdef __BIG_ENDIAN__
- unsigned int type:8;
- unsigned int private:1;
- unsigned int completed:1;
- unsigned int _RESERVED:22;
- #else
- unsigned int _RESERVED:22;
- unsigned int completed:1;
- unsigned int private:1;
- unsigned int type:8;
- #endif
- } _flags;
- }
-
- - initSubject:(char *)subj startDate:(long)start dueDate:(long)due
- completeDate:(long)completed type:(char)type isPrivate:(BOOL)privateFlag
- isCompleted:(BOOL)completeFlag data:(char *)buf dataLen:(int)len;
-
- - initFromItem:(id <ToDoItems>)anItem;
-
- - (char *)subject;
- - (long)startDate;
- - (long)dueDate;
- - (long)dateCompleted;
- - (char)type;
- - (BOOL)isPrivate;
- - (BOOL)isCompleted;
- - (const char *)asciiStartDate;
- - (const char *)asciiCompletedDate;
- - (const char *)asciiDueDate;
- - getData:(char **)d length:(int *)len;
-
- @end
-